package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.vo.Approval.ApprovalForm.ApprovalCategoryVO;
import com.ruoyi.system.domain.vo.Approval.ApprovalForm.ApproverVO;
import com.ruoyi.system.mapper.ApprovalFormMapper;
import com.ruoyi.system.service.IApprovalFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class ApprovalFormImpl implements IApprovalFormService {
    @Autowired
    private ApprovalFormMapper approvalFormMapper;

    @Override
    public List<ApproverVO> selectApprovers() {
        return approvalFormMapper.selectApprovers();
    }

    @Override
    public List<ApprovalCategoryVO> selectApprovalCategoriesByDefaultApproverId(int defaultApproverId) {
        return approvalFormMapper.selectApprovalCategoriesByDefaultApproverId(defaultApproverId);
    }

    @Override
    public int changeDefaultApprover(int id, int nextId) {
        return approvalFormMapper.changeDefaultApprover(id,nextId);
    }

}
